﻿CREATE TABLE [dbo].[comments] (
    [comment_id]      BIGINT         IDENTITY (1, 1) NOT NULL,
    [comment_body]    NVARCHAR (512) NOT NULL,
    [user_id]         BIGINT         NOT NULL,
    [content_item_id] BIGINT         NOT NULL,
    [created]         SMALLDATETIME  NOT NULL,
    CONSTRAINT [PK_comments] PRIMARY KEY CLUSTERED ([comment_id] ASC),
    CONSTRAINT [FK_comments_content_item] FOREIGN KEY ([content_item_id]) REFERENCES [dbo].[content_item] ([content_item_id]),
    CONSTRAINT [FK_comments_users] FOREIGN KEY ([user_id]) REFERENCES [dbo].[users] ([user_id])
);

